package com.newtype.meeting.client.service;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.newtype.meeting.client.model.Department;
import com.newtype.meeting.shared.DepartmentTreeDTO;

@RemoteServiceRelativePath("departmentService")
public interface DepartmentService extends RemoteService {
	/**
	 * 保存部门信息
	 * @param department
	 */
	public void saveDepartment(Department department);

	public List<Department> getDepartmentChildren(Department department);
	
	/**	根据ID返回部门信息 */
	public Department getDepartment(String id);

	/**
	 * 获得组织结构
	 * @return 部门和人员的组织结构
	 */
	public DepartmentTreeDTO getTreeModel();
	
	/**
	 * 获取部门组织结构
	 * @return 部门组织结构
	 */
	public DepartmentTreeDTO getDepartmentTree();

	/** 一级部门列表 */
	public List<DepartmentTreeDTO> listDepartment();

	/** 下级部门列表 */
	public List<DepartmentTreeDTO> listChildDepartment(
			DepartmentTreeDTO department);
	
	
}
